package com.swu.cx.alwayslearning.myretrofit

abstract class ParameterHandler {
    abstract fun apply(serviceMethod: ServiceMethod, value: String)

    class QueryParameterHandler(private val key: String): ParameterHandler() {
        override fun apply(serviceMethod: ServiceMethod, value: String) {
                serviceMethod.addQueryParameter(key, value)
        }

    }

    class FieldParameterHandler(private val key: String): ParameterHandler() {
        override fun apply(serviceMethod: ServiceMethod, value: String) {
            serviceMethod.addFieldParameter(key, value)
        }

    }
}